By combining fermion Quantum Monte Carlo (QMC) simulations with diagrammatic theory, we have calculated the dielectric screening and the screened potential, in a quasi 2D Hubbard model for cuprate superconductors with and without 1/r Coulomb potential. At half filling, we find that the Hubbard electrons contribute only a minor fraction, Delta(epsilon) ~0.9 of the observed in-plane dielectric constant of the cuprates, epsilon ~4.7. With increasing doping x, the 1/r interaction is rapidly suppressed by metallic screening. Surprisingly, near x ~5%, the low-frequency part of the screened potential V_S becomes attractive, at distances r \ge 1. At r=1, it reaches maximum attraction strength for dopings x ~13-15% and becomes repulsive again for for x ~23-25%. Similar results are found for the pure 2D Hubbard model. The 1/r interaction enhances the on-site and 1st neighbor overscreening attraction already present in the pure model at finite doping. Our results are potentially relevant for the d-wave pairing mechanism in the cuprates, suggesting that the screened 1/r potential could actually increase the d-wave attraction, in the 5-25% doping regime. They may also have implications for the isotope effect and its doping dependence. At larger dopings, x>15%, the screened potential becomes attractive even on-site, suggesting that it could support or enhance s-wave pairing. We also give a rigorous analytical proof that the screened on-site interaction must become attractive near half-filling in the repulsive large-U-limit, with and without 1/r interaction. We present a simple physical interpretation of this result in terms of retardation effects. We also point out that on-site overscreening implies singularities in the imaginary frequency dependence of the irreducible polarization insertion and its 3-point vertex function.